#ifndef _UART_PROTOCAL_DLL_H_
#define _UART_PROTOCAL_DLL_H_

#include "EventMacro.h"

#ifdef UART_PROTOCAL_EXPORTS
#define UART_PROTOCAL extern "C" __declspec(dllexport)
#else
#define UART_PROTOCAL __declspec(dllimport)
#endif


#define  MMBUFFSIZE          1024              // Size of shared buffer
#define  TEXTSIZE            256


// Interprocess communication structure mapped in shared memory
typedef struct {
    int nAppCnt[EVENT_ALL_CNT];
    int nReadCnt[EVENT_ALL_CNT];
    TCHAR szText[TEXTSIZE];
} SHAREBUFF;
typedef SHAREBUFF *PSHAREBUFF;

typedef void (UartProtocal_CbkFunc_Read)(TCHAR *pStrUart);


UART_PROTOCAL BOOL UartProtocal_InitUart(DWORD dwEventID, UartProtocal_CbkFunc_Read CbkFunc_Read);
UART_PROTOCAL VOID UartProtocal_Send2App(TCHAR *pStrUart);
UART_PROTOCAL VOID UartProtocal_UninitUart(DWORD dwEventID);
#endif